{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "76a0fdf1",
   "metadata": {},
   "source": [
    "> 1.什么是字符串？\n",
    ">\n",
    "> 2.字符串的一般表示形式？"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ad22bbb3",
   "metadata": {},
   "source": [
    "* 1.字符串是字符的序列\n",
    "\n",
    "2.python中字符串的表达方式有以下几种：\n",
    "\n",
    "(1)使用单引号(’)\n",
    "'Hello,lily'\n",
    "\n",
    "(2)使用双引号(\")\n",
    "”Hello,lily“\n",
    "\n",
    "(3)使用三引号(''')\n",
    "'''Hello,lily'''\n",
    "\n",
    "三引号有一点区别上面两点的功能是：能标记多行字符串，\n",
    "比如：'''hello,my name is lucy,what's your name?'''"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "30174708",
   "metadata": {},
   "source": [
    "> 3.字符串的运算有哪些？ 譬如：+ 是什么意思，取值，切片，索引的概念是什么？"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0b5288cb",
   "metadata": {},
   "source": [
    "* 索引（即下标）\n",
    "\n",
    "* 切片：顾头不顾尾（截取一部分字符串）\n",
    "\n",
    "+ +字符串连接\n",
    "\n",
    "* 重复输出字符串\n",
    "\n",
    "* []通过索引获取字符串中的字符\n",
    "\n",
    "* [:]截取字符串中的一部分\n",
    "\n",
    "* 成员运算符\n",
    "\n",
    "* not in 成员运算符\n",
    "\n",
    "* r/R 原始字符串\n",
    "\n",
    "* % 格式化字符串"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "db841119",
   "metadata": {},
   "source": [
    "> 4.字符串的一般方法？ 譬如：count(),in"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a27c6705",
   "metadata": {},
   "source": [
    "* in 查询成员是否存在\n",
    "\n",
    "str.count() 查询数量\n",
    "\n",
    "str.isdigit() 判断字符串是否是 数字"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "55896a83",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
